/*     */ package com.alipay.api.util;
/*     */ 
/*     */ import com.enation.app.javashop.framework.context.ThreadContextHolder;
/*     */ import com.enation.app.javashop.framework.exception.ServiceException;
/*     */ import java.util.HashMap;
/*     */ import java.util.Map;
/*     */ import javax.servlet.http.HttpServletRequest;
/*     */ import org.aspectj.lang.ProceedingJoinPoint;
/*     */ import org.aspectj.lang.annotation.Around;
/*     */ import org.aspectj.lang.annotation.Aspect;
/*     */ import org.aspectj.lang.annotation.Pointcut;
/*     */ import org.springframework.beans.factory.annotation.Autowired;
/*     */ import org.springframework.stereotype.Service;
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ @Service("alipayPaymnet")
/*     */ @Aspect
/*     */ public class AlipayPayment
/*     */ {
/*     */   @Autowired
/*     */   private AlipayPayConfig alipayConfig;
/*     */   
/*     */   /*@Pointcut("execution( * com.enation.app.javashop.core.goods.service.impl.GoodsManagerImpl.edit*(..) )")
*//*     *//*   private void ma() {}
*//*     *//*
*//*     *//*   @Pointcut("execution( * com.enation.app.javashop.core.member.service.MemberManager.register*(..) )")
*//*     *//*   private void mb1() {}
*//*     *//*
*//*     *//*   @Around("ma()")
*//*     *//*   public Object doma(ProceedingJoinPoint pjp) throws Throwable {
*//*  37 *//*     m();
*//*  38 *//*     return pjp.proceed();
*//*     *//*   }
*//*     *//*
*//*     *//*
*//*     *//*   @Around("mb1()")
*//*     *//*   public Object domb1(ProceedingJoinPoint pjp) throws Throwable {
*//*  44 *//*     m();
*//*  45 *//*     return pjp.proceed();
*//*     *//*   }
*//*     *//*
*//*     *//*
*//*     *//*
*//*     *//*   private void m() {
*//*  51 *//*     HttpServletRequest req = ThreadContextHolder.getHttpRequest();
*//*     *//*
*//*  53 *//*     if (req != null) {
*//*     *//*
*//*  55 *//*       String domain = req.getServerName();
*//*  56 *//*       PaymentResultPaser.parse();
*//*     *//*
*//*     *//*     }
*//*     *//*   }*/
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */   
/*  75 */   private static Map<String, Integer> checkedMap = new HashMap<String, Integer>();
/*     */ 
/*     */   
/*     */   public boolean valid(String domain) {
/*  79 */     Integer checked = checkedMap.get(domain);
/*     */     
/*  81 */     if (checked == null) {
/*  82 */       checked = Integer.valueOf(0);
/*     */     }
/*     */     
/*  85 */     if (checked.intValue() == 2) {
/*  86 */       return false;
/*     */     }
/*     */     
/*  89 */     if (checked.intValue() == 1) {
/*  90 */       return true;
/*     */     }
/*     */     
/*  93 */     if (checked.intValue() == 0) {
/*  94 */       PayUtil.load(this.alipayConfig.getLicense());
/*  95 */       if (PayUtil.verify(domain)) {
/*  96 */         checked = Integer.valueOf(1);
/*  97 */         checkedMap.put(domain, checked);
/*  98 */         return true;
/*     */       } 
/* 100 */       checked = Integer.valueOf(2);
/* 101 */       checkedMap.put(domain, checked);
/* 102 */       return false;
/*     */     } 
/*     */ 
/*     */     
/* 106 */     return false;
/*     */   }
/*     */ }


/* Location:              C:\Users\Administrator\Downloads\jd-gui-windows-1.6.6\jd-gui-windows-1.6.6\alipay-sdk-1.1.jar!\com\alipay\ap\\util\AlipayPayment.class
 * Java compiler version: 5 (49.0)
 * JD-Core Version:       1.1.3
 */